package com.h2cloud.JVM;

import lombok.extern.slf4j.Slf4j;
import org.openjdk.jol.info.ClassLayout;

/**
 * @Package: com.h2cloud.JVM
 * @ClassName: markWork
 * @Author: h2cloud
 * @CreateTime: 2022/10/4 12:26 下午
 * @Description:
 */
@Slf4j
public class markWork {
	public static void main(String[] args) {
		Object o = new Object();
		log.info("未进入同步块，MarkWord 为：");
		log.info(ClassLayout.parseInstance(o).toPrintable(true));
		synchronized (o){
			log.info(("进入同步块，MarkWord 为："));
			log.info(ClassLayout.parseInstance(o).toPrintable(true));
		}
	}

}
